#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
	// 请在此输入您的代码
	int n, s = 1;
	scanf("%d", &n);
	int t = n % 2;
	if (t == 0)
	{
		for (int i = 1; i <= n;)
		{
			s *= 2;
			s += 1;
			i += 2;
		}
	}
	else
	{
		for (int i = 1; i < n;)
		{
			s *= 2;
			s += 1;
			i += 2;
		}
		s *= 2;
	}
	printf("%d", s);
	return 0;
}